package streaming;

import java.net.InetAddress;

import streaming.control.AudioControl;
import streaming.control.VideoControl;

public interface Call {
	
	boolean isAudioAvailable();
	boolean isVideoAvailable();
	
	boolean isAudioEstablished();
	boolean isVideoEstablished();
	
	boolean isAudioRequested();
	boolean isVideoRequested();
	
	// TODO u setVideoRequest, setovati i audio request
	void setVideoRequested(boolean flag);
	void setAudioRequested(boolean flag);
	
	// TODO u setVideoEstablished, setovati i audio request
	void setVideoEstablished(boolean flag);
	void setAudioEstablished(boolean flag);
	
	/**
	 * Inicijalizuje odlazne i dolazne tokove i startuje ih. Neblokirajuci poziv.
	 * @param address
	 * @param ports
	 * @return
	 */
//	boolean initializeCall(InetAddress address, int ports[]);
	
	boolean initializeVideoCall(InetAddress address, int port, int status, boolean isMonitor);
	boolean initializeAudioCall(InetAddress address, int port, int status, boolean isMonitor);
	
	void hangUpCall();
	
	public int getAudioStatus(boolean peerAvailable);
	public int getVideoStatus(boolean peerAvailable);
	
	void start();
	void stop();
	void pause();
	
	public AudioControl getMonitorAudioControl();
	public AudioControl getAudioControl();
	public VideoControl getMonitorVideoControl();
	public VideoControl getVideoControl();
	
}
